package com.example.jdk_demo2;

import com.example.entity.UserInfo;

import java.util.Observable;
import java.util.Observer;

public class MQEventListener implements Observer {


    @Override
    public void update(Observable o, Object arg) {
        System.out.println("o = " + arg);
        UserInfo userInfo = (UserInfo) arg;
        System.out.println("模拟mq发送消息,其中消息的内容是 " + userInfo.toString());
    }
}
